<?php

namespace backend\modules\user\models;

use Yii;

/**
 * This is the model class for table "User".
 *
 * @property int $id
 * @property string|null $username 用户名
 * @property string|null $password 密码
 * @property string $phone 手机号
 * @property int|null $status 状态
 */
class User extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'User';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status'], 'integer'],
            [['username', 'password'], 'string', 'max' => 255],
            [['phone'], 'string', 'max' => 11],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'username' => 'Username',
            'password' => 'Password',
            'phone' => 'Phone',
            'status' => 'Status',
        ];
    }
}
